package znbkChangeZsdLearned.api;

import com.example.lancooznbk.service.HttpPostServer;
import com.lancoo.rxretrofitlibrary.Api.BaseApi;
import com.lancoo.rxretrofitlibrary.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;

import retrofit2.Retrofit;
import rx.Observable;
import znbkChangeZsdLearned.entity.ZnbkSaveLearnedZsdEntity;

/**
 * Created by Administrator on 2018\3\19 0019.
 */

public class ZnbkSaveZsdApi extends BaseApi {

    private ZnbkSaveLearnedZsdEntity mZnbkSaveLearnedZsdEntity;

    public ZnbkSaveLearnedZsdEntity getmZnbkSaveLearnedZsdEntity() {
        return mZnbkSaveLearnedZsdEntity;
    }

    public void setmZnbkSaveLearnedZsdEntity(ZnbkSaveLearnedZsdEntity mZnbkSaveLearnedZsdEntity) {
        this.mZnbkSaveLearnedZsdEntity = mZnbkSaveLearnedZsdEntity;
    }


    public ZnbkSaveZsdApi(HttpOnNextListener listener, RxAppCompatActivity rxAppCompatActivity) {
        super(listener, rxAppCompatActivity);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostServer httpPostServer = retrofit.create(HttpPostServer.class);

        return httpPostServer.saveLearnedZSD(mZnbkSaveLearnedZsdEntity);
    }
}